Skip to content

Update chi to v5.3.1 and implement new chi.Router Query method on http.TracingMux - #172

Merged
markuswustenberg merged 2 commits into
mainfrom
add-tracingmux-query-method
Jul 29, 2026
Merged

Update chi to v5.3.1 and implement new chi.Router Query method on http.TracingMux#172
markuswustenberg merged 2 commits into
mainfrom
add-tracingmux-query-method

Conversation

@maragubot

@maragubot maragubot commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

chi v5.3.1 added Query (the new HTTP QUERY method) to the chi.Router interface, which broke http.TracingMux's interface compliance. This is what's failing the "latest deps" legs of the Compatibility workflow in consuming repos: go get -u -t ./... pulls chi v5.3.1 and glue no longer compiles.

  • Update github.com/go-chi/chi/v5 v5.2.5 → v5.3.1 (also picks up the RealIP IP-spoofing fixes GO-2026-5774/5775/5777)
  • Add http.TracingMux.Query, wrapping the handler with tracing like the other HTTP method registrations
  • Update the other dependencies govulncheck flags, since that check was already red on main: google.golang.org/grpc v1.80.0 → v1.82.1 (GO-2026-6061), golang.org/x/text v0.35.0 → v0.39.0 (GO-2026-5970), github.com/aws/aws-sdk-go-v2/service/s3 v1.96.0 → v1.97.3 plus eventstream v1.7.4 → v1.7.8 (GO-2026-5764), go.opentelemetry.io/otel v1.43.0 → v1.44.0 (GO-2026-5158), and github.com/jackc/pgx/v5 v5.9.0 → v5.9.2 (GO-2026-5004)

One decision deliberately deferred: chi has deprecated middleware.RealIP outright because it trusts spoofable headers, in favor of a new ClientIP* middleware family (ClientIPFromXFF, ClientIPFromXFFTrustedProxies, etc.) that requires an explicit proxy trust model and never mutates r.RemoteAddr. Picking a trust model depends on how the apps are deployed, and dropping the RemoteAddr rewrite changes behavior for anything reading it — so this PR keeps middleware.RealIP with a nolint:staticcheck and a comment. Happy to do the migration in a follow-up if you tell me the proxy setup in front of your apps.

… `http.TracingMux`

chi v5.3.1 adds `Query` (for the HTTP QUERY method) to the `chi.Router` interface, so `http.TracingMux` no longer compiled against it. Also keep the deprecated `middleware.RealIP` for now with a lint exception, to preserve `RemoteAddr` behavior until a proxy trust model is chosen for the new ClientIP middlewares.
- `google.golang.org/grpc` v1.80.0 => v1.82.1 (GO-2026-6061)
- `golang.org/x/text` v0.35.0 => v0.39.0 (GO-2026-5970)
- `github.com/aws/aws-sdk-go-v2/service/s3` v1.96.0 => v1.97.3 and `eventstream` v1.7.4 => v1.7.8 (GO-2026-5764)
- `go.opentelemetry.io/otel` v1.43.0 => v1.44.0 (GO-2026-5158)
- `github.com/jackc/pgx/v5` v5.9.0 => v5.9.2 (GO-2026-5004)
@markuswustenberg
markuswustenberg merged commit 9e88663 into main Jul 29, 2026
3 checks passed
@markuswustenberg
markuswustenberg deleted the add-tracingmux-query-method branch July 29, 2026 10:37
maragubot added a commit to maragudk/app that referenced this pull request Jul 29, 2026
Updates `maragu.dev/glue` to the version including maragudk/glue#172,
which makes glue compile against chi v5.3.1 (the new `chi.Router`
`Query` method). chi moves v5.3.0 → v5.3.1 along with it.

This also makes the Compatibility workflow's "latest deps" legs
deterministic again: with the new glue pinned in `go.mod`, `go get -u -t
./...` can't resolve a stale pre-fix glue from the module proxy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants